/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;

/**
 *
 * @author lab
 */
public class Class implements Serializable{

    private int id;
    private String name;
    private Date createdDate;
    private boolean isPublic;
    private User teacher;
    private ArrayList<User> students;

    public Class() {
        this.name="";
        this.createdDate=new Date();
        this.isPublic=false;
        this.teacher=new User();
        this.students=new ArrayList<User>();
        this.isPublic=false;
    }
//
    public Class(String name, Date createdDate) {
        this.name = name;
        this.createdDate = createdDate;
        this.teacher=new User();
        this.students=new ArrayList<User>();
        this.isPublic=false;
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the createdDate
     */
    public Date getCreatedDate() {
        return createdDate;
    }

    /**
     * @param createdDate the createdDate to set
     */
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    /**
     * is this class can be view by any one or not
     * @return 
     */
    public boolean getIsPublic() {
        return isPublic;
    }

    /**
     * set public value
     * @param isPublic 
     */
    public void setIsPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }

    /**
     * @return the teacher
     */
    public User getTeacher() {
        return teacher;
    }

    /**
     * @param teacher the teacher to set
     */
    public void setTeacher(User teacher) {
        this.teacher = teacher;
    }

    /**
     * @return the students
     */
    public ArrayList<User> getStudents() {
        return students;
    }

    /**
     * @param students the students to set
     */
    public void setStudents(ArrayList<User> students) {
        this.students = students;
    }
}
